/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package PackageUpdater.Config;

import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author wcss
 */
public class Test
{
    public static void main(String[] args)
    {
        try {
            SysConfig sc = new SysConfig();
            sc.setUpdateListUrl("http://www.baidu.com/list.xml");
            sc.setUpdateLogUrl("http://www.baidu.com/log.txt");
            sc.setStartupLogoFile("logo.png");
            sc.setSoftwareWorkspace("/opt/PackageBuilder");
            sc.setSoftName("PackageBuilder");
            sc.setNowUpdateIndex(100);
            sc.setMaintainer("wcss");
            sc.setHomepage("http://www.baidu.com");
            sc.setAppStartupScript("bates.sh");
            SysConfig.save(sc, "/home/wcss/aaa.cfg");
            
            UpdateList ul = new UpdateList();
            ul.setUpdateIndex(101);
            ul.setUpdateLogUrl("http://www.baidu.com/log.txt");
            ul.setUpdateScriptPath("/opt/jsoft/start.sh");
            ul.setUpdateFiles(new UpdateFileEntry[]{ new UpdateFileEntry("http://a.com/a.txt","/opt/jsoft/a.log") });
            UpdateList.save(ul, "/home/wcss/ul.list");
        } catch (Exception ex) {
            Logger.getLogger(Test.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}
